package com.amigo.online.provider.user.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import com.amigo.online.common.core.mybatis.MyMapper;
import com.amigo.online.provider.user.model.entity.UserPhotos;

@Mapper
@Component
public interface UserPhotosMapper extends MyMapper<UserPhotos> {

    List<UserPhotos> getListByUid(@Param("userId") Long userId);

    List<UserPhotos> selectPhotoByIdList(@Param("resultIdList") List<Long> resultIdList);

    @Update("UPDATE user_photos_tbl \n" +
            "\tSET sort = ${sort}\n" +
            "\tWHERE id = ${id}")
    int updatePhotoSort(@Param("id") long id,@Param("sort") int sort);
}
